// Copyright (C) joyinter
// All rights reserved.
// 
// Author : deng xinguo
// Date   : 2005-5-08
#ifndef   __JOYSEQUENCEMANAGER_H
#define   __JOYSEQUENCEMANAGER_H

#include "../../client/provider/CommBridgeBase.h"
#include "../../common/base/LockCS.h"
#include "../../common/base/AutoLockCs.h"
#include "thread.h"


#pragma once

//##ModelId=44C4B5D2007D
class CJoySequenceManager
{
public:
	//##ModelId=44C4B5D2007E
	CJoySequenceManager(void);
	//##ModelId=44C4B5D20080
	~CJoySequenceManager(void);
	//##ModelId=44C4B5D20082
	void MsgIdProducer();
	//##ModelId=44C4B5D2008C
	void ResetMsgId();
	//##ModelId=44C4B5D2008D
	DWORD getMaxMsgIdRvd();
	//##ModelId=44C4B5D2008E
	DWORD getMaxMsgIdSnd();
	//##ModelId=44C4B5D2008F
	DWORD MaxMsgIdRvdIncrease();
public:
	//##ModelId=44C4B5D20090
	DWORD			m_dwMaxMsgIdRvd;
	//##ModelId=44C4B5D20091
	DWORD			m_dwMaxMsgIdSnd;
	//##ModelId=44C4B5D2009D
	CLockCS         m_SequeceLock;

	//##ModelId=44C4B5D200A2
	CJoyCriticalSection m_dwMaxMsgIdRvdLock; 
	

};
#endif//__JOYSEQUENCEMANAGER_H
